<#setting classic_compatible=true> <#assign
	base=request.contextPath /> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/messagePandect/messagePandect.css">
<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/overview/overView.css">
<link rel="stylesheet" type="text/css" href="${base}/zhgl-jzstyxx-manage/css/system/changeStyle.css">
<title>统一消息中心</title>
<!-- 引入通用css -->
<#include "/common/commoncss.ftl">
</head>

<body>
	<!-- 标题栏区域 -->
	<div class="titleColumn">
		<!-- <span class="iconfont icon-peizhi"></span><span id="messagePan" style="margin-left: 20px;">消息总览</span> -->
		<span class="iconfont icon-peizhi"></span><span style="margin-left:20px;">系统管理</span>&nbsp;&nbsp;<span class="fa fa-angle-right"></span>&nbsp;&nbsp;<span id="messagePan">地图</span>
	</div>
	<!-- 正文区域 -->
	<div class="contentTable" id="all">
		<div style="width: 100%;height: 30px;">
			<input type="text" id="suggestId" name="address_detail" placeholder="城市名" >
			<button onclick="dizhi()">查看地图</button>
		</div>
		<div id="allmap" style="width: 100%;height:90%;">
			
		</div>
	</div>
	

	<!-- 引入通用和js -->
	<#include "/common/commonjs.ftl"> 
	<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/login/jquery.cookie.js"></script>
	<script type="text/javascript" src="${base}/zhgl-jzstyxx-manage/js/login/jquery.session.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=kRHuqFbkaoDcf5CsmOY0fwlpOZZgMxkt"></script>
	<script type="text/javascript">
		// 百度地图API功能
		var map = new BMap.Map("allmap");    // 创建Map实例
		//map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);  // 初始化地图,设置中心点坐标和地图级别
		map.centerAndZoom("南京",8);
		//添加地图类型控件
		map.addControl(new BMap.MapTypeControl({
			mapTypes:[
	            BMAP_NORMAL_MAP,
	            BMAP_HYBRID_MAP
	        ]}));	  
		map.setCurrentCity("北京");          // 设置地图显示的城市 此项是必须设置的
		map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
		
		//根据浏览器定位
		var geolocation = new BMap.Geolocation();
		geolocation.getCurrentPosition(function(r){
			if(this.getStatus() == BMAP_STATUS_SUCCESS){
				var mk = new BMap.Marker(r.point);
				map.addOverlay(mk);
				map.panTo(r.point);
				alert('您的位置：'+r.point.lng+','+r.point.lat);
			}
			else {
				alert('failed'+this.getStatus());
			}        
		},{enableHighAccuracy: true})
		
		function dizhi(){
		  var city=$("#suggestId").val();
		 
		  if(city != ""){
			map.centerAndZoom(city,11);      // 用城市名设置地图中心点
		  }
         
         
         
		/* $.ajax({
			"type":"POST",
			"url":"../index/addredis",
			"dataType":"json",
			"data":{"username":username,"password":password,"tel":tel},
			"success":function(obj){
				if(obj!=null){
					console.log("redis:"+obj);
				}
			}
		}); */
	}
	</script>
</body>
</html>